-- GENERATED SPELL FOR [Wrathbone Flayer] --


function spell0_22953(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22953', 572, 1)
end

function spell1_22953(pUnit, Event) --@Ignored,n/a--
pUnit:FullCastSpellOnTarget(39544,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22953', 5254, 1)
end

function Sorts_22953(pUnit, Event)
local choix_sorts_22953 = math.random(0, 1)
if choix_sorts_22953 == 0 then
pUnit:RegisterEvent('spell0_22953', 1, 1)
end
if choix_sorts_22953 == 1 then
pUnit:RegisterEvent('spell1_22953', 1, 1)
end
end

function mob22953_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22953', math.random(1500, 3000), 1)
end

function mob22953_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22953_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22953_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22953, 1, 'mob22953_Action')
RegisterUnitEvent(22953, 2, 'mob22953_Leave')
RegisterUnitEvent(22953, 3, 'mob22953_Kill')
RegisterUnitEvent(22953, 4, 'mob22953_Die')
